home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
webmon_1
/
frmnewga.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1999-08-09
|
7KB
|
196 lines
VERSION 5.00
Begin VB.Form frmNewgateWay
BackColor = &H00FF8080&
BorderStyle = 0 'None
ClientHeight = 3060
ClientLeft = 0
ClientTop = 0
ClientWidth = 4065
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 3060
ScaleWidth = 4065
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtGateWayPort
Height = 270
Left = 1560
TabIndex = 6
Top = 1920
Width = 2295
End
Begin VB.TextBox txtGateWayIP
Height = 270
Left = 1560
TabIndex = 5
Top = 1320
Width = 2295
End
Begin VB.TextBox txtGateWayName
Height = 270
Left = 1560
TabIndex = 4
Top = 720
Width = 2295
End
Begin VB.Image Image2
Height = 480
Left = 1320
Picture = "frmNewgateWay.frx":0000
Top = 2400
Width = 480
End
Begin VB.Image Image1
Height = 480
Left = 2400
Picture = "frmNewgateWay.frx":0442
Top = 2400
Width = 480
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H00FF8080&
Caption = "Add New Server"
BeginProperty Font
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 3
Top = 120
Width = 3615
End
Begin VB.Label Label3
BackColor = &H00FF8080&
Caption = "UDP Port"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 2
Top = 1920
Width = 1215
End
Begin VB.Label Label2
BackColor = &H00FF8080&
Caption = "Server Name"
Height = 375
Left = 240
TabIndex = 1
Top = 720
Width = 1215
End
Begin VB.Label Label1
BackColor = &H00FF8080&
Caption = "Server IP"
Height = 375
Left = 240
TabIndex = 0
Top = 1320
Width = 1095
End
Attribute VB_Name = "frmNewgateWay"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mmflag As Boolean
Dim sax As Integer
Dim Say As Integer
Option Explicit
Private Sub Form_Load()
If blnEdit = True Then
Label4 = "Edit Server"
txtGateWayPort = LSetting("GateWayPort" & intGateClicked)
txtGateWayIP = LSetting("GateWayIP" & intGateClicked)
txtGateWayName = LSetting("GateWayName" & intGateClicked)
End If
End Sub
Private Sub Image1_Click()
If blnEdit = True Then
'editing server
If FrmGateWay.lblGateWay(FrmGateWay.lblGateWay.UBound).Visible = True Then
MsgBox "No more servers", vbOKOnly, "Too many Servers"
Exit Sub
End If
If txtGateWayName <> "" And txtGateWayIP <> "" And txtGateWayPort <> "" Then
SSetting "GateWayName" & intGateClicked, txtGateWayName
SSetting "GateWayIP" & intGateClicked, txtGateWayIP
SSetting "GateWayPort" & intGateClicked, txtGateWayPort
SayThis "Server " & txtGateWayName & " Updated"
End If
modWeb.refresh
Unload Me
Else
If txtGateWayName <> "" And txtGateWayPort <> "" And txtGateWayIP <> "" Then
If IsNumeric(txtGateWayPort) = True And InStr(1, txtGateWayIP, ".") > 0 Then
SSetting "GateWayName" & intNoOfGateServers, txtGateWayName
SSetting "GateWayPort" & intNoOfGateServers, txtGateWayPort
SSetting "GateWayIP" & intNoOfGateServers, txtGateWayIP
intNoOfGateServers = intNoOfGateServers + 1
SSetting "NoOfGateWays", intNoOfGateServers
FrmGateWay.blnAllowAlarm = False
FrmGateWay.tmrStarted.Enabled = True
End If
End If
Unload Me
modWeb.refresh
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim fml As Long
Dim fmt As Long
Dim a As Integer
If mmflag = True Then
fml = Me.Left: fmt = Me.Top
If X > sax Then Me.Left = fml + (X - sax)
If X < sax Then Me.Left = fml - (sax - X)
If Y > Say Then Me.Top = fmt + (Y - Say)
If Y < Say Then Me.Top = fmt - (Say - Y)
End If
Image1.BorderStyle = 0
Image2.BorderStyle = 0
End Sub
Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If mmflag = False Then
sax = X
Say = Y
mmflag = True
End If
Me.MousePointer = vbSizePointer
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mmflag = False
Me.MousePointer = vbDefault
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.BorderStyle = 1
End Sub
Private Sub Image2_Click()
Unload Me
End Sub
Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image2.BorderStyle = 1
End Sub